 <include file="application/home/view/public/header.html"/>
      <!-- /.aside -->
      <section id="content">
        <section class="vbox">
          <section class="scrollable padder">
          
          </header>
          <form class="form-horizontal" data-validate="parsley">
                <section class="panel panel-default">
                 <header class="panel-heading"> <strong>会员注册</strong> </header>
                    <div class="panel-body">
                   
                      <div class="form-group">
                        <label class="col-sm-3 control-label">账号：</label>
                        <div class="col-lg-4">
                          	<input type="text" value="{$account}" class="form-control" name="uname" id="uname"/>
                        </div>
                      </div>
                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label" >密码:</label>
                        <div class="col-lg-4">
                        <input type="password" class="form-control" name="pwd" id="pwd" value="111111"/>
                        </div>&nbsp;(默认：111111)
                      </div>
                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">确认密码:</label>
                        <div class="col-lg-4">
                          	<input type="password" class="form-control" name="twopwd" id="twopwd" value="111111"/>
                        </div>
                      </div>
                     <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label" >二级密码:</label>
                        <div class="col-lg-4">
                          <input type="password" class="form-control" name="topwd" id="topwd" value="222222"/>
                        </div>&nbsp;(默认：222222)
                      </div>

					 <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">确认二级密码:</label>
                        <div class="col-lg-4">
                         <input type="password" class="form-control" name="twotopwd" id="twotopwd" value="222222"/>
                        </div>
                      </div>
                      
                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">邀约人:</label>
                        <div class="col-lg-4">
                          <input type="text" class="form-control" value="{$tuijian.loginName}" name="tuijianid" id="tuijianid"/>
                        </div>
                      </div>
                      
                      <if condition="$system_type eq 2">
                         
                        <else/>


                         <div  id="div-jiedianid">
                         <div class="line line-dashed line-lg pull-in"></div>
                        <div class="form-group">
                          <label class="col-sm-3 control-label">接点人:</label>
                          <div class="col-lg-4">
                            <input type="text" class="form-control" value="{$jiedian.loginName}" name="jiedianid" id="jiedianid"/>
                          </div>
                        </div>
                        </div>
                        
                        <div  id="div-quyu">
                        <div class="line line-dashed line-lg pull-in"></div>
                        <div class="form-group" >
                          <label class="col-sm-3 control-label">区域:</label>
                          <div class="col-lg-4">
                            <select class="form-control" name="quyu" id="quyu">
                              <option value='left' <eq name='quyu' value='left' >selected</eq>>左区</option>
                              <option value="righ" <eq name='quyu' value='righ' >selected</eq>>右区</option>
                            </select>
                          </div>
                        </div>
                        </div>
                      </if>

                       <!--<div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">等级:</label>
                        <div class="col-lg-4">
                          <select class="form-control" name="level" id="level">
                            <option value=''>请选择</option>
                            <foreach name="level" item="vl">
                              <option value="{$vl.id}">{$vl.name}</option>
                            </foreach>
                          </select>
                        </div>
                      </div>-->


                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">真实姓名:</label>
                        <div class="col-lg-4">
                          <input type="text" class="form-control" name="fullname" id="fullname"/>
                        </div>
                      </div>

                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">身份证号:</label>
                        <div class="col-lg-4">
                          <input type="text" class="form-control" name="shenfenzheng" id="shenfenzheng"/>
                        </div>
                      </div>

                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">性别:</label>
                        <div class="col-lg-4">
                         	<select class="form-control" name="sex" id="sex">
								<option value='1' <eq name='sex' value='1' >selected</eq>>男</option>
								<option value="2" <eq name='sex' value='2' >selected</eq>>女</option>
							</select>
                        </div>
                      </div>

                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">电话号码:</label>
                        <div class="col-lg-4">
                          <input type="text" class="form-control" name="tel" id="tel"/>
                        </div>
                      </div>

                       <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">微信:</label>
                        <div class="col-lg-4">
                          <input type="text" class="form-control" name="weixin" id="weixin"/>
                        </div>
                      </div>
                      

                      <!--<div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">收货地址:</label>
                        <div class="col-lg-4">
                          <select name="pro" id="pro" >
							<option>--请选择城市--</option>
						        <foreach name="region" item="v">
							   		<option value="{$v.areaId}">{$v.areaName}</option>
							    </foreach>
						   </select>
						    <select name="city" id="city">
						        <option></option>
						    </select>
						    <select name="area" id="area">
						        <option></option>
						    </select>
                        </div>
                      </div>

                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">邮编:</label>
                        <div class="col-lg-4">
                          <input type="text" class="form-control" name="tel" id="code"/>
                        </div>
                      </div> 

                      <div class="line line-dashed line-lg pull-in"></div>
                      <div class="form-group">
                        <label class="col-sm-3 control-label">详细地址:</label>
                        <div class="col-lg-4">
                        	<input type="text" class="form-control" name="address" id="address"/>
                        </div>
                      </div>-->

                    </div>
                    <footer class="panel-footer text-right bg-light lter">
                      <button type="button" class="btn btn-success btn-s-xs" onclick="sub()" >提 交</button>
                    </footer>
                  </section>
          </form>
          </section>
        </section>
        <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a> </section>
      <aside class="bg-light lter b-l aside-md hide" id="notes">
        <div class="wrapper">Notification</div>
      </aside>
    </section>
  </section>
</section>
<script src="__PUBLIC__/home/js/app.v2.js"></script> <!-- Bootstrap --> <!-- App --> <script src="__PUBLIC__/home/js/charts/easypiechart/jquery.easy-pie-chart.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/sparkline/jquery.sparkline.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.tooltip.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.resize.js" cache="false"></script> <script src="js/charts/flot/jquery.flot.grow.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/demo.js" cache="false"></script> <script src="__PUBLIC__/home/js/calendar/bootstrap_calendar.js" cache="false"></script> <script src="__PUBLIC__/home/js/calendar/demo.js" cache="false"></script> <script src="__PUBLIC__/home/js/sortable/jquery.sortable.js" cache="false"></script>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
</body>
</html>
 <script>
    $('#pro').change(function(){
    	var url = "{:U('Reg/area')}";
    	var pro_id = $('#pro').val();
    	$.post(url,{'pro_id':pro_id},function(data){
    		 $('#city').html(data);
    	});
    });
    $('#city').change(function(){
    	var url = "{:U('Reg/area')}";
    	var pro_id = $('#city').val();
    	$.post(url,{'pro_id':pro_id},function(data){
    		 $('#area').html(data);
    	});
    }); 	
</script>
 <script>
 	function sub(){
			var url="{:U('Reg/add')}";
			var uname = $("#uname").val();
			var pwd = $("#pwd").val();
			var twopwd = $("#twopwd").val();
			var topwd = $("#topwd").val();
			var twotopwd = $("#twotopwd").val();
			var sheng = $("#pro").val();
			var shi = $("#city").val();
			var qu = $("#area").val();
			// var code = $("#code").val();
			 var address = $("#address").val();
			var tuijianid = $("#tuijianid").val();
			var fullname = $("#fullname").val();
			var shenfenzheng = $("#shenfenzheng").val();
      var jiedianid = $('#jiedianid').val();
      var quyu = $("#quyu").val();
			var tel = $("#tel").val();
      var weixin = $("#weixin").val();
			var sex = $("#sex").val();
      //var level = $('#level').val();
      var level = 1;
			if(uname==""||pwd==""||twopwd==""||tuijianid==""||fullname==""||shenfenzheng==""||tel=="" || topwd==""||twotopwd==""||weixin==""){
				layer.msg("请补全信息", {
			 		time: 1500, 
				});	
				return;
			}
			if(sex==null){
				layer.msg("请选择性别", {
			 		time: 1500, 
				});	
				return;
			}
      
			$.post(url,{'uname':uname,'pwd':pwd,'twopwd':twopwd,'topwd':topwd,'twotopwd':twotopwd,'tuijianid':tuijianid,'jiedianid':jiedianid,'quyu':quyu,'fullname':fullname,'shenfenzheng':shenfenzheng,'tel':tel,'sex':sex,'level':level,'sheng':sheng,'shi':shi,'qu':qu,'weixin':weixin,'address':address},function(data){
				if(data.status<0){
					layer.msg(data.info);		
				}else{
					layer.msg(data.info);
					setTimeout(function () { 
				        window.location.href="{:U('Pay/activation')}"
				    }, 2000);
					
				}
			
			});	
		}
 	function checkout_user(){
 		var account = $('#uname').val();
		if(account == ''){
			layer.msg('请输入用户名');
			return;
		}
		var url = "{:U('Reg/checkout_user')}"
		$.post(url,{'account':account},function(data){
			
			layer.msg(data.info);
		})
 	}


  $('#level').change(function(){
    //alert(123231);
    var level = $('#level').val();
      if(level == 5){
         $('#div-quyu').css({display:'none'});
         $('#div-jiedianid').css({display:'none'});
      }else{
         $('#div-quyu').css({display:'inline'});
         $('#div-jiedianid').css({display:'inline'});
      }
  })




 </script>
